CSharpTest.Net
MutexLock Constructor(String,Object[])
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Synchronization Namespace > MutexLock Class > MutexLock Constructor : MutexLock Constructor(String,Object[])

format
args

Glossary Item Box

Creates and locks the named mutex

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal format As String, _
   ByVal ParamArray args() As Object _
)
C# 
public MutexLock( 
   string format,
   params object[] args
)

Parameters

format
args

Example

Library/Library.Test/LockingTests/TestMutexLock.cs

C#Copy Code
using (new MutexLock("MutexLock.{0}", "TestMutexLockByFormattedName"))
{
    Assert.IsFalse(CanLock(new Mutex(false, "MutexLock.TestMutexLockByFormattedName")));
}
VB.NETCopy Code
Using New MutexLock("MutexLock.{0}", "TestMutexLockByFormattedName")
    Assert.IsFalse(CanLock(New Mutex(False, "MutexLock.TestMutexLockByFormattedName")))
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys